Clips out a rectangle of pixels from the input image and places them into the output. If the specified rectangle includes pixels beyond the bounds of the original image, pixels of the pad color will be used to fill in the extra area.
→
→
The uncompressed image to be processed must reside in the Get Queue prior to REQ_EXEC. Typically, the image will be fully contained in the Get Queue, but that is not a requirement. The output image will be placed into the Put Queue during REQ_EXEC.
Padding pixels present at the end of each line will be modified by this operation.
- Subcode is set to SF_SUBCODE_GET_RECTANGLE (11).
- RectX is set to the distance from the left edge, in pixels, of the desired clip. This value can be negative to indicate that pad pixels should be added to the left side of the output image. Valid values are any 32-bit signed integer.
- RectY is set to the distance from the top edge, in pixels, of the desired clip. This value can be negative to indicate that pad pixels should be added to the top of the output image. Valid values are any 32-bit signed integer.
- RectWidth is set to the width, in pixels, of the desired clip. If this causes the rectangle to extend beyond the right edge of the original image, pad pixels will be added to the right side of the output image. Valid values are any value greater than zero.
- RectHeight is set to the height, in pixels, of the desired clip. If this causes the rectangle to extend beyond the bottom edge of the original image, pad pixels will be added to the bottom of the output image. Valid values are any value greater than zero.
- Stride is set to the image line width in bytes including padding at the end of the line width or to 0. If Stride is 0 and PF_NoDibPad is set in PicFlags, the operation will compute the stride using: [ (PixelWidth*BitCount)/8 ]. If Stride is 0 and PF_NoDibPad is not set in PicFlags, the operation will compute the stride using: [ (((PixelWidth*BitCount)+31)&(~31))/8 ].
In addition to placing an output image into the Put Queue, this operation stores some output information into the PIC_PARM structure in the following locations.
- OutputStride is set, during REQ_INIT and REQ_EXEC, to the image line width in bytes including padding at the end of the line.
- BiOut is set, during REQ_INIT and REQ_EXEC, to the attributes of the output image. It will first be set to a copy of the Head structure with the PIC_PARM structure. Then, the biWidth, biHeight, and biSizeImage parameters will be adjusted (if necessary) to the new values.